var chartEdu, chartSpo; //Global

var optionsEdu = {
    chart: {
        renderTo: 'edu_container',
        defaultSeriesType: 'column'

    },
    title:{
        text: ''
    },
    xAxis:{
        title:'Education Level',
        categories:[]
    },
    yAxis:{
        title:{
            text:'No. Of Events'
        }

    },
    series:[{
        name: "No. Of Events",
        data: []

    }]

};

var optionsSpo = {
    chart: {
        renderTo: 'spo_container',
        defaultSeriesType: 'column'

    },
    title:{
        text: ''
    },
    xAxis:{
        title:'',
        categories:[]
    },
    yAxis:{
        title:{
            text:'No. Of Events'
        }

    },
    series:[{
        name: "No. Of Events",
        data: []

    }]

};

function sendChartData(loadURL,dataString,optionList,chartName){
    $.ajax({
        type:"POST",
        url:loadURL,
        data: dataString,
        success: function(data){
            optionList.xAxis.categories = data[0];//Array to store data for x column
            optionList.series[0].data = data[1]; //Array to store data for y column
            chartName = new Highcharts.Chart(optionList);

        }
    });
}